/*
 * main.cpp
 *
 *  Created on: 2011-08-31
 *      Author: pawel
 */

#include"scoreMatrix.h"
#include"smart2DArray.h"
#include"smartAligned2DArray.h"
#include"seqFeederV.h"
#include"seqFeederFile.h"
#include"seqFeederList.h"
#include <stdexcept>
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<Bpp/Seq.all>
#include <Bpp/Seq/Io/Fasta.h>
#include"PerlComp/ProteicAlphabetPerl.h"
#include"enumTypes.h"
#include<ext/slist>
#include"align.h"
#include"alignContainerV.h"
#include"alignContainerScore.h"
#include"alignContainerF.h"
#include"seqFeederRandom.h"
#include"optAlgs/needlemanWunsch.h"
#include"optAlgs/smithWaterman.h"
#include<sys/param.h>
#include"backtrack/backTrack.h"
#include"algorithms.h"
#include"seqLettersFreq.h"
#include"stat/simpleStat.h"
#include"heuristics/fastaAlg.h"
#include"heuristics/fastaAlgParam.h"
#include"CUI/CUIprogramm.h"
using namespace std;
//#define MAX(a, b) (((a) > (b)) ? (a) : (b))
int main(int argc,char *argv[])
{

//	//ios_base::sync_with_stdio(0);
//	optAlgThreadParam param;
//	fastaAlgParam fastaParam;
//	alignContainerF cont;
//	//TODO why blocks when file does not exists ?
//	seqFeederFile fil("/home/pawel/Projekt_inz/databases/uniprot_sprot.fasta/uniprot_sprot.fasta_t",AA);
//	seqFeederFile qu("/home/pawel/Projekt_inz/databases/uniprot_sprot.fasta/ave.fasta",AA);
//	needlemanWunsch ned;
//	smithWaterman smi;
//
//
//	scoreMatrix score("PAM250",AA);
//	param.seqFeederPtr = &fil;
//	param.querySeqPtr = qu.getSeq();
//	param.alignContainerPtr = &cont;
//	param.scoreMatrixPtr = &score;
//	param.optAlgClassPtr = &smi ;
//	param.gopen = 6;
//	param.gext =6;
//	param.btrace = true;
////	param.matrixBounds.minDiag = INT_MIN;
//	//param.matrixBounds.maxDiag = 0;
//	size_t th =1;
//
//	fastaParam.k_tuple =3;
//	fastaParam.w=8;
//	fastaAlg algorytmFasta(param,th,th,fastaParam);
//	algorytmFasta.runAlg();
//
//
//	//optAlgThreadRunner(param,th);
//
////	seqLettersFreq a(param.querySeqPtr);
////	bpp::BasicSequence *ss;
////	ss = a.getSimpleSeq();
////	for(size_t i=0;i<5;i++){
////	cout<<ss->toString()<<endl;
////	ss->shuffle();
////	}
////	cout<<"OK"<<endl;
////	cont.calculateStats(10,param,th);
////	cont.sortByZScore();
//	cont.sortByScore();
//	cout<<cont<<endl;
//	delete param.querySeqPtr;
////	delete ss;
//	//simpleStat stats(&cont);
//	//cout<<"M: "<<stats.getMean()<<"\nD: "<<stats.getStdDev()<<endl;
	try{
	CUIprogramm prog(argc,argv);

	prog.runProgramm();
	}
	catch(std::exception &e){
		cerr<<e.what()<<endl;
	}
	return 0;
}

